#coding=utf-8

import views
import shell


# 注册view
def register_view(app):
    # 测试（用来玩的）
    views.test_views.TestView.register(app, route_prefix='/test')
    # 公用
    views.common_views.CommonView.register(app, route_prefix='/')
    # 用户
    views.user_views.UserView.register(app, route_prefix='/user')
    # 数据集
    views.data_set_views.DataSetView.register(app, route_prefix='/data_set')
    # 数据子集
    views.sub_data_set_views.SubDataSetView.register(app, route_prefix='/sub_data_set')
    # 任务
    views.task_views.TaskView.register(app, route_prefix='/task')
    # 同步
    views.synchronization_views.SynchronizationView.register(app, route_prefix='/synchronization')
    # 批次
    views.batch_views.BatchView.register(app, route_prefix='/batch')


# 注册命令
def register_command(manager):
    manager.add_command('sync_private_world', shell.commands.SyncPrivateWorldCommand())
